spring:
  application:
    name: ${projectName}
  datasource:
    driver-class-name: ${databaseDriverClassName}
    url: ${databaseUrl}
    username: ${databaseUsername}
<#if databasePassword?has_content>
    password: ${databasePassword}
<#else>
    password:
</#if>
  sql:
    init:
      mode: always
      schema-locations: classpath:schema.sql
<#if useH2Database>
  h2:
    console:
      enabled: true
</#if>

mybatis-plus:
  mapper-locations: classpath*:mapper/**/*.xml
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      id-type: ${options.primaryIdType?default("ASSIGN_ID")}

server:
  port: 8080

logging:
  level:
    ${packages.mapper}: debug

# 如需切换到其他数据库，可在脚手架生成时调整数据源参数。
<#if useH2Database>
# 如需切换到 MySQL 等生产数据库，可在脚手架生成时选择对应数据源，或手动修改 spring.datasource.* 配置。
<#else>
# 请将上述用户名和密码调整为实际生产配置；如不需要 schema.sql 初始化，可移除 spring.sql.init 配置。
</#if>

